package com.econ.powercloud.ems.common.enums;

/**
 * @Author : zjf
 * @Description : 场景服务中的四标签对应code信息
 * @Date : 2022/5/20 14:42
 * @Modified by : zjf
 */
public enum SceneIdentificationType {
    COMPUTE_DATA_LABEL("computeLabel", "计算点号标识"),
    MODULE_CODE("moduleCode","产品模块"),
    LOCATION("location","位置"),
    ORDER_NUM("orderNum","排序"),
    ISSUE_VAL_FIXED("valSplit","下发值为某些固定值"),
    FEEDBACK_REAL_DATA("feedbackRealData","遥调点号对应的实测与反馈点号"),
    SPECIAL_LABEL("specialLabel","特殊标签(如:单体电压,单体温度,BMU最值等)"),
    NAME_IN_EMS("nameInEms","遥测遥信点号在EMS中的名称"),
    OTHER_LOCATION("otherLocation","其他位置信息"),
    ;

    private String code;
    private String desc;

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    SceneIdentificationType(String code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static String getCodeFromCode(String code){
        for(SceneIdentificationType type: SceneIdentificationType.values()){
            if(code.equals(type.getCode())){
                return type.getDesc();
            }
        }
        return null;
    }

}
